home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / libg_261.zip / libg_261 / libio / Makefile.in < prev    next >
Makefile  |  1994-10-20  |  4KB  |  108 lines

  1. # Copyright (C) 1993 Free Software Foundation
  2. # This file is part of the GNU IO Library.  This library is free
  3. # software; you can redistribute it and/or modify it under the
  4. # terms of the GNU General Public License as published by the
  5. # Free Software Foundation; either version 2, or (at your option)
  6. # any later version.
  7. # This library is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with GNU CC; see the file COPYING.  If not, write to
  13. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  14.  
  15. srcdir = .
  16. VERSION = 0.66
  17. # The config file (overriden by Linux).
  18. _G_CONFIG_H=_G_config.h
  19. tooldir = $(exec_prefix)/$(target)
  20. INSTALLDIR = $(libdir)
  21.  
  22. IO_OBJECTS = filedoalloc.o floatconv.o genops.o fileops.o \
  23.   iovfprintf.o \
  24.   iovfscanf.o ioignore.o iopadn.o \
  25.   iofgetpos.o iofread.o iofscanf.o \
  26.   iofsetpos.o iogetdelim.o iogetline.o \
  27.   ioprintf.o ioseekoff.o ioseekpos.o \
  28.   outfloat.o strops.o iofclose.o iopopen.o ioungetc.o
  29.  
  30. # These emulate stdio functionality, but with a different name (_IO_ungetc
  31. # instead of ungetc), and using _IO_FILE instead of FILE.
  32. # They are not needed for C++ iostream, nor stdio, though some stdio
  33. # files are build using the same source files (see stdio/configure.in).
  34. # They are needed for iostdio.h.
  35. # iofclose.o is not here, because it is needed for stdio (by pclose).
  36. STDIO_WRAP_OBJECTS =  iofdopen.o iofflush.o iofgets.o iofopen.o iofprintf.o iofputs.o iofwrite.o \
  37.   iogets.o ioperror.o ioputs.o ioscanf.o iosetbuffer.o iosetvbuf.o \
  38.   iosprintf.o iosscanf.o ioftell.o iovsprintf.o iovsscanf.o stdfiles.o
  39.  
  40. IOSTREAM_OBJECTS = builtinbuf.o filebuf.o fstream.o \
  41.   indstream.o ioassign.o ioextend.o iomanip.o iostream.o \
  42.   isgetline.o isgetsb.o isscan.o \
  43.   osform.o procbuf.o sbform.o sbgetline.o sbscan.o \
  44.   stdiostream.o stdstrbufs.o stdstreams.o stream.o streambuf.o strstream.o \
  45.   PlotFile.o SFile.o parsestream.o pfstream.o editbuf.o
  46.  
  47. # These files define _IO_read etc, which are just wrappers for read(2) etc.
  48. # They need to be changed to use name-space-clean (e.g. __read) versions
  49. # for each specific libc.
  50. OSPRIM_OBJECTS = ioprims.o iostrerror.o cleanup.o
  51.  
  52. LIBIOSTREAM_OBJECTS = $(IO_OBJECTS) $(IOSTREAM_OBJECTS) $(OSPRIM_OBJECTS)
  53. LIBIO_OBJECTS = $(IO_OBJECTS) $(STDIO_WRAP_OBJECTS) $(OSPRIM_OBJECTS)
  54.  
  55. USER_INCLUDES = *.h
  56.  
  57. #### package, host, target, and site dependent Makefile fragments come in here.
  58. ##
  59.  
  60. libio.a: $(_G_CONFIG_H) $(LIBIO_OBJECTS)
  61.     -rm -rf libio.a
  62.     $(AR) $(AR_FLAGS) libio.a $(LIBIO_OBJECTS)
  63.     $(RANLIB) libio.a
  64.  
  65. libiostream.a: $(_G_CONFIG_H) $(LIBIOSTREAM_OBJECTS)
  66.     -rm -rf libiostream.a
  67.     $(AR) $(AR_FLAGS) libiostream.a $(LIBIOSTREAM_OBJECTS)
  68.     $(RANLIB) libiostream.a
  69.  
  70. test: test.o libio.a
  71.     $(CC) -o test test.o libio.a
  72. tpipe: tpipe.o libio.a
  73.     $(CC) -o tpipe tpipe.o libio.a
  74.  
  75. iostream.list: $(_G_CONFIG_H) $(LIBIOSTREAM_OBJECTS)
  76.     @echo "$(LIBIOSTREAM_OBJECTS)"> iostream.list
  77.  
  78. # The CC=$(CXX) is a kludge to force use of gcc.
  79. _G_config.h: ${srcdir}/gen-params
  80.     rootme=`pwd`/ ; export rootme; \
  81.     CC="$(CXX)"; export CC; \
  82.     CXX="$(CXX) $(NOSTDINC) $(CXXFLAGS)"; export CXX; \
  83.     CONFIG_NM="$(NM)"; export CONFIG_NM; \
  84.     $(SHELL) ${srcdir}/gen-params LIB_VERSION=$(VERSION) $(G_CONFIG_ARGS) >tmp-params.h
  85.     mv tmp-params.h _G_config.h
  86.  
  87. install:
  88.     if [ "$(_G_CONFIG_H)" != "" ]; then \
  89.       rm -f $(tooldir)/include/_G_config.h ; \
  90.         $(INSTALL_DATA) _G_config.h $(tooldir)/include/_G_config.h || exit 1; \
  91.     fi
  92.     cd $(srcdir); \
  93.     for FILE in $(USER_INCLUDES) ; do \
  94.         rm -f $(gxx_includedir)/$$FILE ; \
  95.         $(INSTALL_DATA) $$FILE $(gxx_includedir)/$$FILE ; \
  96.         chmod a-x $(gxx_includedir)/$$FILE ; \
  97.     done
  98.     $(INSTALL_DATA) libiostream.a $(INSTALLDIR)/libiostream.a
  99.     $(RANLIB) $(INSTALLDIR)/libiostream.a
  100.     chmod a-x $(INSTALLDIR)/libiostream.a
  101.  
  102. c++clean:
  103.     rm -rf $(IOSTREAM_OBJECTS) _G_config.h
  104.     @$(MAKE) $(FLAGS_TO_PASS) "DODIRS=tests" DO=clean subdir_do
  105.